var wangchen = {

	//成功弹出层
	success: function(message,url){
		layer.msg(message, {icon: 1,time:2000}, function(index){
            layer.close(index);
            window.location.href=url;
        });
	},

	// 错误弹出层
	error: function(message) {
        layer.msg(message, {icon: 2,time:2000}, function(index){
            layer.close(index);
        });       
    },

	// 确认弹出层
    confirm : function(id,url,thisobj) {
        layer.confirm('确认删除此条记录吗?', {icon: 3, title:'提示'}, function(index){
	        $.getJSON(url, {'id' : id}, function(res){
	            if(res.code == 1){
	                layer.msg(res.msg,{icon:1,time:1500,shade: 0.1});
	                //避免删除后没有移除 行
	                if(thisobj)
						$(thisobj).parent().parent().remove();

	                Ajaxpage()
	            }else{
	                layer.msg(res.msg,{icon:0,time:1500,shade: 0.1});
	            }
	        });
	        layer.close(index);
	    })
    },
    // 卸载模块弹出层
    plug : function(url) {
	    layer.confirm('确认卸载此模块？卸载后数据将不存在', {icon: 3,title: '提示',
            btn1:function(){

                location.href = url;
            },
            btn2:function(index){
                layer.close(index);
            }
        });
    },
}